package com.example.projuct.demos.week.week3.chapter2_1;

/**
 * @author jll
 * @createTime 2025/4/9
 * @description 封装代码---猫
 * @version: 1.0
 */
public class Cat {

    // 修改属性可见性--只能在当前类内访问，在外面new一个cat，是没办法对name直接赋值或使用
    private String name;
    private Integer age;

    public static String color;



    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
